The present invention relates to a logic simulation, and in particular, to a method and a system for measuring coverage in a microprogram tested in the logic simulation.
In a conventional logic simulation, a logic simulation model and a microprogram are loaded in the logic simulator. The logic simulation model comprises types of gates included in a logic circuit to be simulated, connection between the gates, and program memory. The microprogram is loaded in the program memory. The microprogram comprises a series of instruction steps. In operation, a simulation executor executes instruction steps of the microprogram one after another using test data corresponding to various test cases and delivers an executed result to an external circuit or circuits, so that the logic simulation is performed.
The microprogram often includes one or more branch instructions in the series of instruction steps. The branch instruction is an instruction for destining different instruction steps as destination steps and for indicating to select one of the destination steps as an instruction step to be next executed. Accordingly, a pass of execution of instruction steps is branched or separated into different passes towards those destination steps at the branching instruction step. Those different passes towards the destination steps are referred to as branching passes. Selection of those branching passes is made in dependence on a condition at the branching instruction step.
Since instructions of the instruction steps in the microprogram are held in memory addresses in the program memory, the indication of those destination steps is made by use of memory addresses. Those memory addresses indicating the destination steps are referred to as destination addresses. On the other hand, the branching step is referred to as a source step and the memory address corresponding to the source step is also referred to as a source address.
In execution of the microprogram including the branching passes in the logic simulation, all of the branching passes are desired to be tested or passed. Accordingly, coverage of the branching passes passed in the simulation should be measured.
In a conventional simulator, the measuring is performed by use of information of change of signals resulted from the simulation by monitoring status of signals. However, the conventional measuring has a problem that the signal change information is too large and requires a large file capacity therefor.